<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
     <%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Entity.*"%>
<%@page import="Dao.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>学习论坛</title>
</head>
<body>
<link href="css/showAllLearningResource.css" rel="stylesheet" type="text/css" />
<jsp:useBean id="LearningResourceDao" class="Dao.LearningResourceDao"></jsp:useBean>
<div class="header"><font size="6" color="#000000">所有学习资源</font>
</div>
<br/>
<div class="neck">
<form action="learningResource_Search_Result.jsp" method="post" name="search_form">
<input style="float:right" type="submit" value="搜索" />
<input type="text" name="searchText" style="float:right"/>
</form>
</div>
<br/>
<div class="body">
<table class="dataintable">
<tr>
<td>资源ID</td>
<td>标签</td>
<td>资源名称</td>
<td>上传者ID</td>
<td>上传时间</td>
<td colspan="2">热度</td>
</tr>
<%
List<LearningResource> all_lrlist=new LearningResourceDao().showAllLearningResourceOrderByThumbNumber();
for(LearningResource lr:all_lrlist){
%>
<tr>
<td><input type="text" value=<%=lr.getResourceID() %> readonly> </td>
<td><input type="text" value=<%=lr.getLabel() %> readonly></td>
<td><input type="text" value=<%=lr.getResourceName() %> readonly></td>
<td><input type="text" value=<%=lr.getUploaderID() %> readonly></td>
<td><input type="text" value=<%=lr.getUploadTime() %> readonly></td>
<td><input type="text" value=<%=lr.getThumbNumber() %> readonly>
<a href="/UniversityResourceSystem/ThumbServlet?resourceID=<%=lr.getResourceID() %>&&userName=<%=session.getAttribute("session_userName") %>" style="text-decoration: none;">点赞</a></td>
<td><a href="downloadLearningResource.jsp?resourceID=<%=lr.getResourceID() %>" style="text-decoration: none;" target="_blank">查看</a></td>
</tr>
<% 
}
%>
</table>
</div>
<div class="foot">
		<font color="white">Made by Aaron</a></font></div>
</body>
</html>